package com.spzx.product.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import org.apache.poi.ss.formula.functions.T;

import java.util.ArrayList;
import java.util.List;

public class ExcelListener extends AnalysisEventListener<T> {
    //可以通过实例获取该值
    private List<T> datas = new ArrayList<>();
    @Override
    public void invoke(T o, AnalysisContext analysisContext) {
            datas.add(o);
    }
    public List<T> getDatas(){
        return datas;
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
